package cn.com.thinvent.dispatch.service.biz;

import cn.com.thinvent.dispatch.entity.ModelDatasource;
import cn.com.thinvent.dispatch.entity.file.fileShowVo;
import cn.com.thinvent.dispatch.entity.response.DataSourceDetailResponse;
import cn.com.thinvent.dispatch.entity.response.PagedGridResult;
import cn.com.thinvent.dispatch.entity.response.TableFieldsResponse;
import cn.com.thinvent.dispatch.entity.response.TablesResponse;
import org.apache.ibatis.annotations.Param;

import java.io.IOException;
import java.sql.SQLException;

public interface DataSourceService {

    PagedGridResult<ModelDatasource> list(Integer pageNum, Integer pageSize);

    ModelDatasource saveOrUpdate(ModelDatasource modelDatasource);

    TablesResponse getTables(ModelDatasource modelDatasource) throws SQLException;

    TableFieldsResponse getTableFields(ModelDatasource modelDatasource) throws SQLException;

    PagedGridResult<fileShowVo> listUnStruct(Integer pageNum, Integer pageSize, Integer tagId);

    void delUnStruct(Integer dId);

    DataSourceDetailResponse detail(Integer datasourceId, Integer pageNum, Integer pageSize) throws SQLException, ClassNotFoundException, IOException;
}
